package com.mano.mall.web.shop.member.feign;

import com.mano.mall.api.dto.member.input.UserLoginInpDTO;
import com.mano.mall.api.dto.member.output.UserOutputDTO;
import com.mano.mall.api.member.MemberService;
import com.mano.mall.common.base.BaseApiService;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

@FeignClient(value = "mano-mall-member",fallback = MemberServiceFeignCallBack.class)
public interface MemberServiceFeign extends MemberService {

}

@Component
class MemberServiceFeignCallBack extends BaseApiService implements MemberServiceFeign{
    @Override
    public BaseResponse<UserOutputDTO> existMobile(String mobile) {
        return setResultError("服务器忙，请稍后重试");
    }

    @Override
    public BaseResponse<UserOutputDTO> getInfo(String token) {
        return setResultError("服务器忙，请稍后重试");
    }

    @Override
    public BaseResponse<UserOutputDTO> ssoLogin(UserLoginInpDTO userLoginInpDTO) {
        return setResultError("服务器忙，请稍后重试");
    }
}